package com.fudan.run;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import org.apache.spark.api.java.JavaRDD;

public class VariableRddMap {
	private Map<String,JavaRDD<Map<String,Object>>> variableMap;

	public VariableRddMap() {
		variableMap = new ConcurrentHashMap<String, JavaRDD<Map<String,Object>>>();
	}

	public void addRdd(String key,JavaRDD<Map<String,Object>> rdd) {
		variableMap.put(key, rdd);
	}

	public JavaRDD<Map<String,Object>> getRdd(String name) {
		return variableMap.get(name);
	}

	public Map<String, JavaRDD<Map<String, Object>>> getVariableMap() {
		return variableMap;
	}
	public void setVariableMap(Map<String, JavaRDD<Map<String, Object>>> variableMap) {
		this.variableMap = variableMap;
	}

}
